/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.auth.manager.impl;

import com.xy.biz.auth.dao.UserLogStatusDao;
import com.xy.biz.auth.domain.bo.UserLogStatusBO;
import com.xy.biz.auth.domain.converter.UserLogStatusConverter;
import com.xy.biz.auth.domain.query.UserLogStatusQuery;
import com.xy.biz.auth.manager.UserLogStatusManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 
 * 
 * @author zsp
 * @date 2020-8-20
 */
@Service
public class UserLogStatusManagerImpl implements UserLogStatusManager {

	@Autowired
	private UserLogStatusDao userLogStatusDao;
	
	@Override
	public int saveUserLogStatus(UserLogStatusBO userLogStatusBO) {
		return userLogStatusDao.saveUserLogStatus(UserLogStatusConverter.toPO(userLogStatusBO));
	}
	
	@Override
	public int updateUserLogStatus(UserLogStatusBO userLogStatusBO) {
		return userLogStatusDao.updateUserLogStatus(UserLogStatusConverter.toPO(userLogStatusBO));
	}
	
	@Override
	public List<UserLogStatusBO> listUserLogStatus(UserLogStatusQuery query) {
		return UserLogStatusConverter.fromPO(userLogStatusDao.listUserLogStatus(query));
	}
	
	@Override
	public int countUserLogStatus(UserLogStatusQuery query) {
		return userLogStatusDao.countUserLogStatus(query);
	}
	
}
